﻿@model Sispe.Entities.SANCION_FALTA

@{
    ViewBag.Title = "Edit";
}

    <link rel="stylesheet" href="~/Content/themes/base/jquery-ui.css">
    <script src="~/Scripts/jquery-1.10.2.js"></script>
    <script src="~/Scripts/jquery-ui.js"></script>
    <link rel="stylesheet" href="/resources/demos/style.css">

<script>
    $(function () {
        $.datepicker.setDefaults($.datepicker.regional["es"]);
        $("#FechaInicio").datepicker({
            firstDay: 1,
            showButtonPanel: true
        });
    });
</script>

<script>
    $(function () {
        $.datepicker.setDefaults($.datepicker.regional["es"]);
        $("#FechaTermino").datepicker({
            showButtonPanel: true,
            firstDay: 1
        });
    });
</script>



@using (Html.BeginForm()) {
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>SANCION_FALTA</legend>

        @Html.HiddenFor(model => model.IdSancion)

        @Html.Hidden("IdSancion")

        @Html.Hidden("IdContrato")

         <div class="editor-label">
            @Html.LabelFor(model => model.IdTipoSancion, "TIPO_SANCION")
        </div>
        <div class="editor-field">
            @Html.DropDownList("IdTipoSancion")
            @Html.ValidationMessageFor(model => model.IdTipoSancion)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.FechaInicio)
        </div>
        <div class="editor-field">
            @Html.TextBox("FechaInicio")
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.FechaTermino)
        </div>
        <div class="editor-field">
            @Html.TextBox("FechaTermino")
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Motivo)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Motivo)
            @Html.ValidationMessageFor(model => model.Motivo)
        </div>

        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    <a href="@Url.Action("Index", "Sancion", new { id = Html.Value("IdContrato") })">
                <img src ="@Url.Content("~/Images/back.png")" title="Volver a Sanciones" 
                    alt="Volver a Sanciones" /></a> 
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}

@{
    var message = TempData["AlertMessage"] ?? string.Empty;
}

<script type="text/javascript">
    var message = '@message';
    if (message)
        alert(message).alert;
</script>